package com.sdy.supermarket.biz.service;

import com.sdy.common.model.BizException;
import com.sdy.supermarket.biz.model.GsOrder;
import com.sdy.supermarket.biz.model.GsOrderItem;

import java.util.List;

public interface ApplyService {
    /**
     * 提交申请
     *
     * @param gsOrder 申请内容
     * @return 订单号
     */
    String newApply(GsOrder gsOrder) throws Exception;

    /**
     * 修改订单
     *
     * @param gsOrderItem
     * @throws BizException
     * @return
     */
    int updateOrder(GsOrderItem gsOrderItem) throws BizException;

    /**
     * 提交申请
     *
     * @param gsOrderItem 申请内容
     * @return 订单号
     */
    void newOrder(GsOrderItem gsOrderItem) throws BizException;

    /**
     * 移除购物车内容
     *
     * @param orderItemIdList 待删除id
     * @param userId
     * @param checked         是否下架内容
     * @return
     */
    void removeOrderItem(List<Integer> orderItemIdList, Integer userId, Boolean checked) throws BizException;

    /**
     * 提交订单
     *
     * @param orderItemIdList
     * @param userId
     */
    void submitOrder(List<Integer> orderItemIdList, Integer userId) throws BizException;
}
